SlideShare a Scribd company logo
1 of 24
Testing dan Implementasi Sistem  Suwanto Raharjo Pertemuan ke 2:White Box Testing
White Box Testing ,[object Object],[object Object]
White Box Testing ,[object Object],[object Object],[object Object],[object Object],[object Object]
White Box dan Black Box testing
White Box Testing ,[object Object],[object Object],[object Object],[object Object]
White Box Testing ,[object Object],[object Object],[object Object],[object Object]
Basis Path Testing Statement    Decision    Path  coverage ? ? ?
Basis Path Testing
White Box Testing Independent Path pada gambar di  atas: 1. 1-2-7-8 (property owned, pay rent) 2. 1-2-7-9 (property owned, no money for rent) 3. 1-2-3-4-5-6 (buy house) 4. 1-2-3  (don't want to buy) 5. 1-2-3-4  (want to buy, don't have enough money) Cyclomatic Complecity : Suatu ukuran untuk menghitung kekomplekan suatu kode sumber : CC = Jumlah edges – jumlah node + 2 atau Jumlah Kondisi + 1
White Box Testing
White Box Testing public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; }
White Box Testing public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1
White Box Testing public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2
White Box Testing public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F
White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F
White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T
White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T 6 F 6 F
White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T 6 F 6 F 9 9
White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T 6 F 6 F 7 T 9 7 T 9
White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T 6 F 6 F 7 T 8 F 9 7 T 8 F 9
White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T 6 F 6 F 7 T 8 F 9 7 T 8 F 9
White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T 6 F 6 F 7 T 8 F 9 7 T 8 F 9
White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T 6 F 6 F 7 T 8 F 9 7 T 8 F 9
Test Case ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

Top down and botttom up Parsing
Top down     and botttom up ParsingTop down     and botttom up Parsing
Top down and botttom up Parsing
Gerwin Ocsena
 
Storyboard math
Storyboard mathStoryboard math
Storyboard math
shandex
 
Math functions, relations, domain & range
Math functions, relations, domain & rangeMath functions, relations, domain & range
Math functions, relations, domain & range
Renee Scott
 

What's hot (18)

Top down and botttom up Parsing
Top down     and botttom up ParsingTop down     and botttom up Parsing
Top down and botttom up Parsing
 
Left factor put
Left factor putLeft factor put
Left factor put
 
Ch5b
Ch5bCh5b
Ch5b
 
Storyboard math
Storyboard mathStoryboard math
Storyboard math
 
ALF 5 - Parser Top-Down
ALF 5 - Parser Top-DownALF 5 - Parser Top-Down
ALF 5 - Parser Top-Down
 
Limit aljabar ukb coba2 kelas 11
Limit aljabar ukb coba2 kelas 11Limit aljabar ukb coba2 kelas 11
Limit aljabar ukb coba2 kelas 11
 
12 doloops
12 doloops12 doloops
12 doloops
 
Math functions, relations, domain & range
Math functions, relations, domain & rangeMath functions, relations, domain & range
Math functions, relations, domain & range
 
Declarative Semantics Definition - Static Analysis and Error Checking
Declarative Semantics Definition - Static Analysis and Error CheckingDeclarative Semantics Definition - Static Analysis and Error Checking
Declarative Semantics Definition - Static Analysis and Error Checking
 
Relations and functions
Relations and functionsRelations and functions
Relations and functions
 
The Ring programming language version 1.5.1 book - Part 18 of 180
The Ring programming language version 1.5.1 book - Part 18 of 180The Ring programming language version 1.5.1 book - Part 18 of 180
The Ring programming language version 1.5.1 book - Part 18 of 180
 
Relations and functions
Relations and functionsRelations and functions
Relations and functions
 
Math presentation on domain and range
Math presentation on domain and rangeMath presentation on domain and range
Math presentation on domain and range
 
Formal Grammars
Formal GrammarsFormal Grammars
Formal Grammars
 
Lesson 18
Lesson 18Lesson 18
Lesson 18
 
Relations and function class xii copy
Relations and function class xii   copyRelations and function class xii   copy
Relations and function class xii copy
 
7 functions
7   functions7   functions
7 functions
 
Functions domain-range
Functions domain-rangeFunctions domain-range
Functions domain-range
 

Viewers also liked

The sqa unit and other actors in the sqa system
The sqa unit and other actors in the sqa systemThe sqa unit and other actors in the sqa system
The sqa unit and other actors in the sqa system
irna_300791
 
Configuration management
Configuration managementConfiguration management
Configuration management
ashamarsha
 
Rekayasa Perangkat Lunak JAMINAN KUALITAS PERANGKAT LUNAK
Rekayasa Perangkat Lunak JAMINAN KUALITAS PERANGKAT LUNAKRekayasa Perangkat Lunak JAMINAN KUALITAS PERANGKAT LUNAK
Rekayasa Perangkat Lunak JAMINAN KUALITAS PERANGKAT LUNAK
Listyowatik (Yanie)
 
SQA architecture
SQA architectureSQA architecture
SQA architecture
ashamarsha
 
Jaminan Kualitas Perangkat Lunak
Jaminan Kualitas Perangkat LunakJaminan Kualitas Perangkat Lunak
Jaminan Kualitas Perangkat Lunak
Yunita Rainbow
 
Pertemuan 04 Software Testing Techniques 2
Pertemuan 04     Software  Testing  Techniques  2Pertemuan 04     Software  Testing  Techniques  2
Pertemuan 04 Software Testing Techniques 2
Mrirfan
 
Pertemuan 04 Software Testing Techniques
Pertemuan 04     Software  Testing  TechniquesPertemuan 04     Software  Testing  Techniques
Pertemuan 04 Software Testing Techniques
Mrirfan
 
Ratnasuhartiniunairbab4
Ratnasuhartiniunairbab4Ratnasuhartiniunairbab4
Ratnasuhartiniunairbab4
Mrirfan
 
Pertemuan 04 Software Testing Techniques
Pertemuan 04    Software Testing TechniquesPertemuan 04    Software Testing Techniques
Pertemuan 04 Software Testing Techniques
Mrirfan
 
Pertemuan 3
Pertemuan 3Pertemuan 3
Pertemuan 3
Mrirfan
 

Viewers also liked (20)

The sqa unit and other actors in the sqa system
The sqa unit and other actors in the sqa systemThe sqa unit and other actors in the sqa system
The sqa unit and other actors in the sqa system
 
Flowchart
FlowchartFlowchart
Flowchart
 
Flowchart
FlowchartFlowchart
Flowchart
 
Sqa Automation
Sqa AutomationSqa Automation
Sqa Automation
 
Pertemuan 06 Black Box Testing
Pertemuan 06      Black Box  TestingPertemuan 06      Black Box  Testing
Pertemuan 06 Black Box Testing
 
Configuration management
Configuration managementConfiguration management
Configuration management
 
Rekayasa Perangkat Lunak JAMINAN KUALITAS PERANGKAT LUNAK
Rekayasa Perangkat Lunak JAMINAN KUALITAS PERANGKAT LUNAKRekayasa Perangkat Lunak JAMINAN KUALITAS PERANGKAT LUNAK
Rekayasa Perangkat Lunak JAMINAN KUALITAS PERANGKAT LUNAK
 
SQA architecture
SQA architectureSQA architecture
SQA architecture
 
Teknik Pengujian Perangkat Lunak
Teknik Pengujian Perangkat LunakTeknik Pengujian Perangkat Lunak
Teknik Pengujian Perangkat Lunak
 
Jaminan Kualitas Perangkat Lunak
Jaminan Kualitas Perangkat LunakJaminan Kualitas Perangkat Lunak
Jaminan Kualitas Perangkat Lunak
 
Pertemuan 04 Software Testing Techniques 2
Pertemuan 04     Software  Testing  Techniques  2Pertemuan 04     Software  Testing  Techniques  2
Pertemuan 04 Software Testing Techniques 2
 
Pertemuan 04 Software Testing Techniques
Pertemuan 04     Software  Testing  TechniquesPertemuan 04     Software  Testing  Techniques
Pertemuan 04 Software Testing Techniques
 
Ratnasuhartiniunairbab4
Ratnasuhartiniunairbab4Ratnasuhartiniunairbab4
Ratnasuhartiniunairbab4
 
Pertemuan 04 Software Testing Techniques
Pertemuan 04    Software Testing TechniquesPertemuan 04    Software Testing Techniques
Pertemuan 04 Software Testing Techniques
 
Strategi Pengujian Perangkat Lunak Mg Ke 8 Lanj
Strategi Pengujian Perangkat Lunak Mg Ke 8 LanjStrategi Pengujian Perangkat Lunak Mg Ke 8 Lanj
Strategi Pengujian Perangkat Lunak Mg Ke 8 Lanj
 
Pertemuan 3
Pertemuan 3Pertemuan 3
Pertemuan 3
 
M K P L Pertemuan5
M K P L  Pertemuan5M K P L  Pertemuan5
M K P L Pertemuan5
 
Pengertian Etika
Pengertian EtikaPengertian Etika
Pengertian Etika
 
Teori Etika Keperawatan
Teori Etika KeperawatanTeori Etika Keperawatan
Teori Etika Keperawatan
 
04 Testing Perangkat Lunak
04 Testing Perangkat Lunak04 Testing Perangkat Lunak
04 Testing Perangkat Lunak
 

Similar to Pertemuan 3

Question 1,2,4 ------------------------------------Please check.pdf
Question 1,2,4 ------------------------------------Please check.pdfQuestion 1,2,4 ------------------------------------Please check.pdf
Question 1,2,4 ------------------------------------Please check.pdf
anandhomeneeds
 
6-Practice Problems - LL(1) parser-16-05-2023.pptx
6-Practice Problems - LL(1) parser-16-05-2023.pptx6-Practice Problems - LL(1) parser-16-05-2023.pptx
6-Practice Problems - LL(1) parser-16-05-2023.pptx
venkatapranaykumarGa
 
Submit1) Java Files2) Doc file with the following contents.pdf
Submit1) Java Files2) Doc file with the following contents.pdfSubmit1) Java Files2) Doc file with the following contents.pdf
Submit1) Java Files2) Doc file with the following contents.pdf
akaluza07
 
-JAVA-provide a test class that do the required -you may add met.pdf
-JAVA-provide a test class that do the required -you may add met.pdf-JAVA-provide a test class that do the required -you may add met.pdf
-JAVA-provide a test class that do the required -you may add met.pdf
alphawheels007
 
c++Write a program to test the selection sort algorithm for array-.pdf
c++Write a program to test the selection sort algorithm for array-.pdfc++Write a program to test the selection sort algorithm for array-.pdf
c++Write a program to test the selection sort algorithm for array-.pdf
akpatra2000
 
I need to fill-in TODOs in .cpp file and in .h file Could some.pdf
I need to fill-in TODOs in .cpp file and in .h file Could some.pdfI need to fill-in TODOs in .cpp file and in .h file Could some.pdf
I need to fill-in TODOs in .cpp file and in .h file Could some.pdf
forladies
 
Please finish the int LLInsert function.typedef struct STUDENT {.pdf
Please finish the int LLInsert function.typedef struct STUDENT {.pdfPlease finish the int LLInsert function.typedef struct STUDENT {.pdf
Please finish the int LLInsert function.typedef struct STUDENT {.pdf
fortmdu
 
Lecture 12 data structures and algorithms
Lecture 12 data structures and algorithmsLecture 12 data structures and algorithms
Lecture 12 data structures and algorithms
Aakash deep Singhal
 
AI CHALLENGE ADMIN
AI CHALLENGE ADMINAI CHALLENGE ADMIN
AI CHALLENGE ADMIN
Ankit Gupta
 
Ejemplo En Gambas
Ejemplo En GambasEjemplo En Gambas
Ejemplo En Gambas
eduann
 

Similar to Pertemuan 3 (20)

Ds program-print
Ds program-printDs program-print
Ds program-print
 
Question 1,2,4 ------------------------------------Please check.pdf
Question 1,2,4 ------------------------------------Please check.pdfQuestion 1,2,4 ------------------------------------Please check.pdf
Question 1,2,4 ------------------------------------Please check.pdf
 
Linked lists
Linked listsLinked lists
Linked lists
 
6-Practice Problems - LL(1) parser-16-05-2023.pptx
6-Practice Problems - LL(1) parser-16-05-2023.pptx6-Practice Problems - LL(1) parser-16-05-2023.pptx
6-Practice Problems - LL(1) parser-16-05-2023.pptx
 
Code
CodeCode
Code
 
Submit1) Java Files2) Doc file with the following contents.pdf
Submit1) Java Files2) Doc file with the following contents.pdfSubmit1) Java Files2) Doc file with the following contents.pdf
Submit1) Java Files2) Doc file with the following contents.pdf
 
-JAVA-provide a test class that do the required -you may add met.pdf
-JAVA-provide a test class that do the required -you may add met.pdf-JAVA-provide a test class that do the required -you may add met.pdf
-JAVA-provide a test class that do the required -you may add met.pdf
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
c++Write a program to test the selection sort algorithm for array-.pdf
c++Write a program to test the selection sort algorithm for array-.pdfc++Write a program to test the selection sort algorithm for array-.pdf
c++Write a program to test the selection sort algorithm for array-.pdf
 
I need to fill-in TODOs in .cpp file and in .h file Could some.pdf
I need to fill-in TODOs in .cpp file and in .h file Could some.pdfI need to fill-in TODOs in .cpp file and in .h file Could some.pdf
I need to fill-in TODOs in .cpp file and in .h file Could some.pdf
 
Please finish the int LLInsert function.typedef struct STUDENT {.pdf
Please finish the int LLInsert function.typedef struct STUDENT {.pdfPlease finish the int LLInsert function.typedef struct STUDENT {.pdf
Please finish the int LLInsert function.typedef struct STUDENT {.pdf
 
Unit6 C
Unit6 C Unit6 C
Unit6 C
 
Lecture 12 data structures and algorithms
Lecture 12 data structures and algorithmsLecture 12 data structures and algorithms
Lecture 12 data structures and algorithms
 
COMPILER DESIGN- Syntax Directed Translation
COMPILER DESIGN- Syntax Directed TranslationCOMPILER DESIGN- Syntax Directed Translation
COMPILER DESIGN- Syntax Directed Translation
 
AI CHALLENGE ADMIN
AI CHALLENGE ADMINAI CHALLENGE ADMIN
AI CHALLENGE ADMIN
 
C++Write a function void headEnqueue(Queue q, int key) which enqu.pdf
C++Write a function void headEnqueue(Queue q, int key) which enqu.pdfC++Write a function void headEnqueue(Queue q, int key) which enqu.pdf
C++Write a function void headEnqueue(Queue q, int key) which enqu.pdf
 
12 white box testing-fixed
12 white box testing-fixed12 white box testing-fixed
12 white box testing-fixed
 
The Ring programming language version 1.3 book - Part 18 of 88
The Ring programming language version 1.3 book - Part 18 of 88The Ring programming language version 1.3 book - Part 18 of 88
The Ring programming language version 1.3 book - Part 18 of 88
 
Ejemplo En Gambas
Ejemplo En GambasEjemplo En Gambas
Ejemplo En Gambas
 
program on string in java Lab file 2 (3-year)
program on string in java Lab file 2 (3-year)program on string in java Lab file 2 (3-year)
program on string in java Lab file 2 (3-year)
 

More from Mrirfan

Pertemuan 06 Black Box Testing
Pertemuan 06     Black Box TestingPertemuan 06     Black Box Testing
Pertemuan 06 Black Box Testing
Mrirfan
 
Pertemuan 04 Software Testing Techniques 2
Pertemuan 04    Software Testing Techniques  2Pertemuan 04    Software Testing Techniques  2
Pertemuan 04 Software Testing Techniques 2
Mrirfan
 
Mkpl Pertemuan5
Mkpl Pertemuan5Mkpl Pertemuan5
Mkpl Pertemuan5
Mrirfan
 

More from Mrirfan (19)

Pertemuan 06 Black Box Testing
Pertemuan 06     Black Box TestingPertemuan 06     Black Box Testing
Pertemuan 06 Black Box Testing
 
Pertemuan 04 Software Testing Techniques 2
Pertemuan 04    Software Testing Techniques  2Pertemuan 04    Software Testing Techniques  2
Pertemuan 04 Software Testing Techniques 2
 
Mkpl Pertemuan5
Mkpl Pertemuan5Mkpl Pertemuan5
Mkpl Pertemuan5
 
Kel2 Data Warehouse
Kel2 Data WarehouseKel2 Data Warehouse
Kel2 Data Warehouse
 
Kel2 Data Warehouse 2
Kel2 Data Warehouse 2Kel2 Data Warehouse 2
Kel2 Data Warehouse 2
 
2 Basic Principal Of Utp Installation
2 Basic Principal Of Utp Installation2 Basic Principal Of Utp Installation
2 Basic Principal Of Utp Installation
 
1 Introduction To Premises Cabling System
1 Introduction To Premises Cabling System1 Introduction To Premises Cabling System
1 Introduction To Premises Cabling System
 
Modul 16 Perc7 Bluetooth
Modul 16 Perc7 BluetoothModul 16 Perc7 Bluetooth
Modul 16 Perc7 Bluetooth
 
Wireless Lan 2004 Antennas
Wireless Lan 2004   AntennasWireless Lan 2004   Antennas
Wireless Lan 2004 Antennas
 
5 Installing Premises Cabling System
5 Installing Premises Cabling System5 Installing Premises Cabling System
5 Installing Premises Cabling System
 
4 Structure Cabling System Design
4 Structure Cabling System Design4 Structure Cabling System Design
4 Structure Cabling System Design
 
3 Basic Principal Of Fo Installation
3 Basic Principal Of Fo Installation3 Basic Principal Of Fo Installation
3 Basic Principal Of Fo Installation
 
1 Klasifikasi Jaringan
1 Klasifikasi Jaringan1 Klasifikasi Jaringan
1 Klasifikasi Jaringan
 
7 Keamanan Jaringan 1
7 Keamanan Jaringan 17 Keamanan Jaringan 1
7 Keamanan Jaringan 1
 
6 Wan Kinerja Tinggi 1
6 Wan Kinerja Tinggi 16 Wan Kinerja Tinggi 1
6 Wan Kinerja Tinggi 1
 
5 Wide Area Network (Wan)
5 Wide Area Network (Wan)5 Wide Area Network (Wan)
5 Wide Area Network (Wan)
 
3 Lan Kinerja Tinggi 1
3 Lan Kinerja Tinggi 13 Lan Kinerja Tinggi 1
3 Lan Kinerja Tinggi 1
 
2 Local Area Network
2 Local Area Network2 Local Area Network
2 Local Area Network
 
Flowchart
FlowchartFlowchart
Flowchart
 

Pertemuan 3

  • 1. Testing dan Implementasi Sistem Suwanto Raharjo Pertemuan ke 2:White Box Testing
  • 2.
  • 3.
  • 4. White Box dan Black Box testing
  • 5.
  • 6.
  • 7. Basis Path Testing Statement Decision Path coverage ? ? ?
  • 9. White Box Testing Independent Path pada gambar di atas: 1. 1-2-7-8 (property owned, pay rent) 2. 1-2-7-9 (property owned, no money for rent) 3. 1-2-3-4-5-6 (buy house) 4. 1-2-3 (don't want to buy) 5. 1-2-3-4 (want to buy, don't have enough money) Cyclomatic Complecity : Suatu ukuran untuk menghitung kekomplekan suatu kode sumber : CC = Jumlah edges – jumlah node + 2 atau Jumlah Kondisi + 1
  • 11. White Box Testing public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; }
  • 12. White Box Testing public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1
  • 13. White Box Testing public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2
  • 14. White Box Testing public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F
  • 15. White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F
  • 16. White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T
  • 17. White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T 6 F 6 F
  • 18. White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T 6 F 6 F 9 9
  • 19. White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T 6 F 6 F 7 T 9 7 T 9
  • 20. White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T 6 F 6 F 7 T 8 F 9 7 T 8 F 9
  • 21. White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T 6 F 6 F 7 T 8 F 9 7 T 8 F 9
  • 22. White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T 6 F 6 F 7 T 8 F 9 7 T 8 F 9
  • 23. White Box Testing 3 public static int binarySearch( int key, int[] sequence ) { int bottom = 0; int top = sequence.length - 1; int mid = 0; int keyPosition = -1; while( bottom <= top && keyPosition == -1 ) { mid = ( top + bottom ) / 2; if( sequence[ mid ] == key ) { keyPosition = mid; } else { if( sequence[ mid ] < key ) { bottom = mid + 1; } else { top = mid - 1; } } } return keyPosition; } 1 1 2 2 10 10 F F 3 T T F F 4 T 4 T 5 T 5 T 6 F 6 F 7 T 8 F 9 7 T 8 F 9
  • 24.